{#
(C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com>

This file is part of "vikuit".

"vikuit" is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

"vikuit" is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with "vikuit".  If not, see <http://www.gnu.org/licenses/>.
#}

{% extends "layouts/module-layout.html" %}

{% block head %}
	<link rel="alternate" type="application/rss+xml" title="{{ _('Latest articles by %s')|format(this_user.author_nickname) }}" href="/feed/module/user/{{ this_user.nickname }}" />
{% endblock %}

{% block title %} {{ this_user.nickname }}: {{ _('communities') }} {% endblock %}

{% block rightSidebar %}
	<div class="box">
		<h1>Sindicación RSS</h1>
		<p class="options center"><a href="/feed/module/user/{{ this_user.nickname }}"><img src="/static/images/feed.png" alt="feed" class="icon" /> {{ _('Latest articles by %s')|format(this_user.author_nickname) }}</a></p>
		<p class="end-box">&nbsp;</p>
	</div>
{% endblock %}

{% block content %}
	<h1><img src="/images/user/thumbnail/{{ this_user.nickname }}" alt="{{ this_user.nickname}}" style="vertical-align: middle" /> <a href="/module/user/{{ this_user.nickname }}">{{ this_user.nickname }}</a>: {{ _('communities') }}</h1>

	<table class="grid">
		<thead>
			<tr>
				<th>&nbsp;</th>
				<th class="left">Título</th>
			</tr>
		</thead>
		<tbody>
		{% for community in communities %}
			<tr {% if loop.index % 2 == 0 %}class="even"{% endif %}>
			    <td class="center"><a href="/module/community/{{ community.community_url_path }}"><img src="/images/community/thumbnail/{{ community.community.key().id() }}" alt="{{ community.community_title|escape }}" title="{{ community.community_title|escape }}" /></a></td>
				<td class="left"><a href="/module/community/{{ community.community_url_path }}"><strong>{{ community.community_title|escape }}</strong></a></td>
			</tr>
		{% endfor %}
		</tbody>
	</table>
	
	{% include 'inc-pagination.html' %}
{% endblock %}